<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <script>

        var arr1 = [1, 2, 3];
        var arr2 = [4, 5, 6];

        // function myConcat() {
        //     // arguments
        //     var arr3 = [];

        //     for (var i = 0; i < arguments.length; i++) {
        //         // arguments[i] 是数组
        //         for (var j = 0; j < arguments[i].length; j++) {
        //             arr3.push(arguments[i][j]);
        //         }
        //     }

        //     console.log(arr3);
        // }


        // myConcat(arr1, arr2, ['a', 'b'])



        var arr = [1, 2, 3];

        var res = arr.concat();

        console.log(res);

        console.log(arr === res);

    </script>

</body>

</html>